﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CountryModify.aspx.cs" Inherits="Admin_ActivityTypeModify" MasterPageFile="~/MasterPages/AdminMaster.master"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

   <style>
       .maintitle {
           font-size: large;
           font-weight: bold;
       } 
       .auto-style1 {
           height: 17px;
           width: 4%;
       }
       .auto-style2 {
           width: 4%;
       }
       .auto-style3 {
           height: 18px;
           width: 4%;
       }
       </style>
   
     <table style="width: 100%" id="TABLE2" cellspacing="1" cellpadding="1" border="0">
                <tbody>
                    <tr>
                        <td colspan="3" style="text-align: left;"><asp:ScriptManager ID="ScriptID" runat="server"></asp:ScriptManager>
                            <asp:Label ID="lblTitle" runat="server" Font-Size="30px" Text="Add Country Master"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                      <td colspan="3" style="text-align: left;"></td>
                    </tr>
                    <tr>
                        <td style="width: 45%; height: 17px" align="right">
                        </td>
                        <td>
                        </td>
                        <td style="width: 54%; height: 17px">
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 45%; height: 17px" align="right">
                        </td>
                        <td>
                        </td>
                        <td style="width: 54%; height: 17px">
                        
                    <asp:Label ID="lblMessage" runat="server" Font-Bold="True" ></asp:Label></td>
            </tr>
                     <tr>
                        <td style="width: 45%; height: 17px" align="right">&nbsp;
                        </td>
                        <td>&nbsp;
                        </td>
                        <td style="width: 54%; height: 17px" align="left">&nbsp;
                        </td>
                    </tr>
                    <tr>
                        <td style="width: 45%" align="right">
                            Country Name &nbsp;<font color="red">*</font>
                        </td>
                        <td>&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                        <td style="width: 54%" align="left">
                            <asp:TextBox ID="txtActivityTypeName" runat="server" Width="220px" MaxLength="50"></asp:TextBox>&nbsp; <asp:RequiredFieldValidator ID="reqLanguageName"  ControlToValidate="txtActivityTypeName" runat="server" ErrorMessage="Enter Country Name." ForeColor="Red" ></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                 <tr>
                         <td style="width: 45%" align="right">
                            Country Tel Code &nbsp;<font color="red">*</font>
                        </td>
                        <td>&nbsp;&nbsp;:&nbsp;&nbsp;
                        </td>
                        <td style="width: 54%" align="left">
                            <asp:TextBox ID="TextBox1" runat="server" Width="220px" MaxLength="50"></asp:TextBox>&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator2"  ControlToValidate="TextBox1" runat="server" ErrorMessage="Enter Country Tel Code." ForeColor="Red"></asp:RequiredFieldValidator>
                        </td>
                 </tr>
                    <tr>
                        <td style="width: 45%" align="right">
                            Country Code &nbsp;<font color="red">*</font>
                        </td>
                        <td>&nbsp;&nbsp;:&nbsp;&nbsp;
                        </td>
                        <td style="width: 54%" align="left">
                            <asp:TextBox ID="TextBox2" runat="server" Width="220px" MaxLength="50"></asp:TextBox>&nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator3"  ControlToValidate="TextBox2" runat="server" ErrorMessage="Enter Country Code." ForeColor="Red"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                     <tr>
                        <td style="width: 45%" align="right">
                            Region Name &nbsp;<font color="red">*</font>
                        </td>
                        <td>&nbsp;&nbsp;:&nbsp;&nbsp;</td>
                        <td style="width: 54%" align="left">
                            <asp:DropDownList ID="regiondropdownlist" runat="server" Width="220px" MaxLength="50" DataValueField="RegionID" DataTextField="RegionName" > </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="regiondropdownlist" ErrorMessage="Please Select Any Region" InitialValue="--Select--" ForeColor="Red"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                     <tr>
                        <td style="width: 45%" align="right">
                            Is Active&nbsp; 
                        </td>
                        <td>&nbsp;&nbsp;:&nbsp;&nbsp;
                        </td>
                        <td style="width: 54%" align="left">
                            <asp:CheckBox ID="chkIsactive" runat="server" /> 
                        </td>
                    </tr>
                        <tr>
                            <td align="right" style="width: 45%; height: 18px"></td>
                            <td></td>
                            <td style="width: 54%; height: 18px" align="left"></td>
                        </tr>
                        <tr>
                            <td align="right" colspan="3" style="height: 30px; text-align: center">
                                <asp:Button ID="btnSave" runat="server" OnClick="btnSave_OnClick"  SkinID="buttonSkin" Text="Save"  />
                                &nbsp; &nbsp;
                                <asp:Button ID="btnCancel" runat="server" CausesValidation="false" OnClick="btnCancel_OnClick" SkinID="buttonSkin" Text="Cancel" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" style="height: 30px; text-align: center">
                             </td>
                        </tr>
                </tbody>
            </table>
    <asp:Panel ID="LangaugeList" runat="server">
        <asp:HiddenField ID="hfCountryLanguageID" runat="server" />
        <table style="width: 100%"  cellspacing="1" cellpadding="1" border="0"> 
            <tr>
                <td colspan="3"  align="left">
                    <h4>Country Language List</h4>
                </td>
            </tr>
            <tr>
                <td style="width: 45%" align="right">
                                Language Code &nbsp;<font color="red">*</font>
                </td>
                <td>&nbsp;&nbsp;:&nbsp;&nbsp;
                </td>
                <td style="width: 54%" class="text-left">
                    <asp:DropDownList ID="comLanguage" runat="server" Width="220px" MaxLength="50" DataValueField="LanguageID" DataTextField="LanguageName" > </asp:DropDownList>&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="comLanguage" ErrorMessage="Please Select Any Language" InitialValue="--Select--" ForeColor="Red" ValidationGroup="Language"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 45%" align="right">
                    Is Active&nbsp; 
                </td>
                <td>&nbsp;&nbsp;:&nbsp;&nbsp;
                </td>
                <td style="width: 54%" class="text-left">
                    <asp:CheckBox ID="cbxLanguageActive" runat="server" /> 
                </td>
            </tr>
             <tr>
                    <td style="width: 45%" align="right">
                    Language Order &nbsp;<font color="red">*</font>
                </td>
                <td>&nbsp;&nbsp;:&nbsp;&nbsp;
                </td>
                <td style="width: 54%" class="text-left">
                    <asp:TextBox ID="txtLanguageOrder" runat="server" Width="220px" MaxLength="50"></asp:TextBox>
                    
                    &nbsp; <asp:RequiredFieldValidator ID="RequiredFieldValidator5"  ControlToValidate="txtLanguageOrder" runat="server" ErrorMessage="Enter Language Order" ForeColor="Red" ValidationGroup="Language"></asp:RequiredFieldValidator>
                    <asp:RangeValidator ID="RangeValidator1" ControlToValidate="txtLanguageOrder" runat="server" ErrorMessage="Enter between 0 to 100" ValidationGroup="Language" Type="Integer" MinimumValue="0" MaximumValue="100"  ForeColor="Red" ></asp:RangeValidator>
                </td>
            </tr>
            <tr>
                <td style="width: 45%"></td>
                <td></td>
                <td  style="width: 54%" class="text-left">
                    <asp:Button ID="btnAddLanguage" runat="server" Text="Add" OnClick="btnAddLanguage_Click" ValidationGroup="Language" />
                    <asp:Button ID="btnClearLanguge" runat="server" Text="Clear" OnClick="btnClearLanguge_Click" /></td>
            </tr>
            <tr>
                <td colspan="3" align="center" >
                    <asp:GridView ID="gvLanguage" runat="server" AutoGenerateColumns="False" OnRowCommand="gvLanguage_RowCommand" >
                        <Columns>
                            <asp:BoundField DataField="LanguageID" HeaderText="LanguageID" Visible="False" />
                            <asp:BoundField DataField="LanguageName" HeaderText="LanguageName" />
                            <asp:BoundField DataField="IsActive" HeaderText="IsActive" />
                            <asp:BoundField DataField="LanguageOrder" HeaderText="LanguageOrder" />
                            <asp:BoundField DataField="CountryID" HeaderText="CountryID" Visible="False" />
                            <asp:BoundField DataField="CountryLanguageID" HeaderText="CountryLanguageID" Visible="False" />
                            <asp:TemplateField>
                                <ItemTemplate>
                                    <asp:LinkButton ID="lnkEdit"   runat="server" CausesValidation="false" CommandName="EDITLANGUAGE"
                                        CommandArgument='<%# Eval("CountryLanguageID") + ";" + Eval("LanguageID") + ";" + Eval("IsActive") + ";" + Eval("LanguageOrder") %>'>Edit</asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle Width="15%" />
                            </asp:TemplateField>
                        </Columns>
                        </asp:GridView>
                </td>
            </tr>
        </table>
    </asp:Panel>
</asp:Content>

